package itheima.d08;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class Test1_diedai {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add("苍老师");
        c.add("小泽老师");
        c.add("冲田老师");
        c.add("饭老师");
        c.add("波多老师");


        Iterator<String> it = c.iterator();


//        System.out.println(it.next());
//        System.out.println(it.next());
//        System.out.println(it.next());
//        System.out.println(it.next());
//        System.out.println(it.next());
        while (it.hasNext()){
            System.out.println(it.next());
        }
    }
}
